<div class="callout callout-info">
    <h4>{:__('Alert')}!</h4>
    {:__('To add fields, please bind the form model first, the generated fields please fill in the parameters accurately')}
</div>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label for="c-formList" class="control-label col-xs-12 col-sm-2">{:__('Form Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-formList" data-rule="required" class="form-control selectpicker" name="row[form_id]">
                {foreach name="formList" item="vo"}
                <option value="{$vo.id}">{$vo.name}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label for="c-formTitle" class="control-label col-xs-12 col-sm-2">{:__('Field Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" id="c-formTitle" name="row[title]" class="form-control" value="" />
        </div>
    </div>

    <div class="form-group">
        <label for="c-formName" class="control-label col-xs-12 col-sm-2">{:__('Field Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" id="c-formName" name="row[name]" class="form-control" value="" />
        </div>
    </div>

    <div class="form-group">
        <label for="c-formType" class="control-label col-xs-12 col-sm-2">{:__('Field Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-formType" name="row[type]" data-rule="required" class="form-control">
                <option value="int">int</option>
                <option value="tinyint">tinyint</option>
                <option value="varchar">varchar</option>
                <option value="char">char</option>
                <option value="text">text</option>
                <option value="date">date</option>
                <option value="datetime">datetime</option>
                <option value="timestamp">timestamp</option>
                <option value="time">time</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label for="c-formShowType" class="control-label col-xs-12 col-sm-2">{:__('Field Show Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-formShowType" name="row[show_type]" data-rule="required" class="form-control">
                <option value="1">文本框</option>
                <option value="2">多行文本</option>
                <option value="3">编辑器</option>
                <option value="4">文件上传</option>
                <option value="10">单图片上传</option>
                <option value="5">组图上传</option>
                <option value="6">下拉菜单</option>
                <option value="7">日期和时间</option>
                <option value="8">单选</option>
                <option value="9">多选</option>
            </select>
            <p class="help-block">{:__('We support the control: a single line of text, multiple lines of text, drop-down box, radio buttons, check boxes')}</p>
        </div>
    </div>

    <div class="form-group">
        <label for="c-formLength" class="control-label col-xs-12 col-sm-2">{:__('Field Length')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" id="c-formLength" name="row[length]" class="form-control" value="" />
        </div>
    </div>

    <div class="form-group">
        <label for="c-formDecimal" class="control-label col-xs-12 col-sm-2">{:__('Field Decimal')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" id="c-formDecimal" name="row[decimal]" class="form-control" value="" />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Field Required')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[required]', ['1'=>__('Yes'), '0'=>__('No')])}
        </div>
    </div>

    <div class="form-group">
        <label for="c-formNotes" class="control-label col-xs-12 col-sm-2">{:__('Field Notes')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" id="c-formNotes" name="row[notes]" class="form-control" value="" />
        </div>
    </div>

    <div class="form-group">
        <label for="c-formDefault" class="control-label col-xs-12 col-sm-2">{:__('Field Default')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" id="c-formDefault" name="row[default]" class="form-control" value="" />
            <p class="help-block">{:__('No use (judgment of different field types)')}</p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Backend Display')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[backend_show]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
        </div>
    </div>

    <div class="form-group">
        <label for="c-setting" class="control-label col-xs-12 col-sm-2">{:__('Field Setting')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-setting" class="form-control" name="row[setting]"></textarea>
            <p class="help-block">{:__('Dropdown frame format: man--男||woman--女||default--保密')}</p>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
